package com.fruit.mapper.order;

import java.util.List;

import com.fruit.pojo.order.Order;
import com.fruit.pojo.order.OrderGoods;
import com.fruit.pojo.user.MyFruitTree;
import com.fruit.pojo.user.UserAction;

public interface OrderMapper {


	/**
	 * 通过交易流水获取订单信息
	 * @param transactionId
	 * @return
	 * @author admin
	 * @version 2017
	 */
	Order getOrderByTransactionId(long transactionId);
	
	/**
	 * 修改订单状态
	 * @param order
	 * @return
	 * @author admin
	 * @version 2017
	 */
	int updateOrderStateById(Order order);
	
	/**
	 * 获取订单商品信息
	 * @param orderId
	 * @return
	 * @author admin
	 * @version 2017
	 */
	List<OrderGoods> getOrderGoodsByOrderId(long orderId);
	
	/**
	 * 修改商品实际库存
	 * @param og
	 * @return
	 * @author admin
	 * @version 2017
	 */
	int updateGoodsSpecRealStockNum(OrderGoods og);
	
	/**
	 * 新增我的果树
	 * @param mft
	 * @return
	 * @author admin
	 * @version 2017
	 */
	int saveMyFruitTree(MyFruitTree mft);
	
	/**
	 * 修改果树CODE编号
	 * @param mft
	 * @return
	 * @author admin
	 * @version 2017
	 */
	int updateMyFruitTreeCode(MyFruitTree mft);
	
	/**
	 * 新增我的行为
	 * @param ua
	 * @return
	 * @author admin
	 * @version 2017
	 */
	int saveUserAction(UserAction ua);
}
